const mongoose = require('mongoose')
const { dbHost } = require('../../conf/index')
const { generateId } = require('../../utils/index')

const connection = mongoose.createConnection(`mongodb://${dbHost}/manage_db`)

const Schema = mongoose.Schema

const songListSchema = new Schema({
  songlistNo: {
    type: String,
    default() {
      return generateId('GD')
    }
  },
  songListImg: { type: String, default: '' }, //歌单图片
  title: {
    type: String,
    default() {
      return '' //
    }
  }, //昵称
  description: { type: String, default: '' }, // 简介
  style: { type: Array, default: [] } // 风格
})

module.exports = connection.model('song_list', songListSchema)
